<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Swarm Trajectory Planning: src/data_fitting.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Swarm Trajectory Planning
   </div>
   <div id="projectbrief">Contains tools for measuring UAV swarm performance when flying through a path graph and allows the UAV swarm to fly through a generated graph.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">data_fitting.cpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Contains functions required for evaluating the graph.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;../headers/data_fitting.h&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for data_fitting.cpp:</div>
<div class="dyncontent">
<div class="center"><img src="data__fitting_8cpp__incl.png" border="0" usemap="#src_2data__fitting_8cpp" alt=""/></div>
<map name="src_2data__fitting_8cpp" id="src_2data__fitting_8cpp">
<area shape="rect" id="node2" href="data__fitting_8h_source.html" title="../headers/data_fitting.h" alt="" coords="88,80,247,107"/>
</map>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a74deb510fd707d8e6674b5dd45af6d31"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="data__fitting_8cpp.html#a74deb510fd707d8e6674b5dd45af6d31">fitting_run</a> (double time_without_obstacles, vector&lt; double &gt; x, vector&lt; vector&lt; double &gt;&gt; y)</td></tr>
<tr class="separator:a74deb510fd707d8e6674b5dd45af6d31"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4527de60f484ec1a00df7164372d480a"><td class="memItemLeft" align="right" valign="top">vector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="data__fitting_8cpp.html#a4527de60f484ec1a00df7164372d480a">lin_fit</a> (vector&lt; double &gt; x, vector&lt; double &gt; y)</td></tr>
<tr class="separator:a4527de60f484ec1a00df7164372d480a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a375adde1de04ca6d8bae502b2902aa74"><td class="memItemLeft" align="right" valign="top">vector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="data__fitting_8cpp.html#a375adde1de04ca6d8bae502b2902aa74">exp_fit</a> (vector&lt; double &gt; x, vector&lt; double &gt; y)</td></tr>
<tr class="separator:a375adde1de04ca6d8bae502b2902aa74"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Contains functions required for evaluating the graph. </p>
<p>Contains functions required for evaluating the graph using a heuristic function. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a375adde1de04ca6d8bae502b2902aa74"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vector&lt;double&gt; exp_fit </td>
          <td>(</td>
          <td class="paramtype">vector&lt; double &gt;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vector&lt; double &gt;&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Fits an exponential function to the input data </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X-axis of the input data </td></tr>
    <tr><td class="paramname">y</td><td>Y-axis of the input data </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::vector&lt;double&gt; of the exponential parameters (a,b) for f(x)=a*e^(b*x) </dd></dl>

</div>
</div>
<a class="anchor" id="a74deb510fd707d8e6674b5dd45af6d31"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fitting_run </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>time_without_obstacles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vector&lt; double &gt;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vector&lt; vector&lt; double &gt;&gt;&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Computes the edges evaluation function and prints it out (d = distance, g = gap size, f = flock size) </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">time_without_obstacles</td><td>measured time without obstacles normalized to 1 meter </td></tr>
    <tr><td class="paramname">x</td><td>x[i] = gap size for i-th measurement </td></tr>
    <tr><td class="paramname">y</td><td>y[FLOCK_SIZE][i] = measured time increment for i-th gap size (normalized to 1 meter) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a4527de60f484ec1a00df7164372d480a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vector&lt;double&gt; lin_fit </td>
          <td>(</td>
          <td class="paramtype">vector&lt; double &gt;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vector&lt; double &gt;&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Fits a linear function to the input data </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X-axis of the input data </td></tr>
    <tr><td class="paramname">y</td><td>Y-axis of the input data </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::vector&lt;double&gt; of the exponential parameters (a,b) for f(x)=ax+b </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
